package com.lap.auth.application.authentication.assembler;

import com.lap.auth.application.authentication.dto.UserDto;
import com.lap.auth.domain.user.User;
import org.mapstruct.Mapper;

@Mapper(componentModel = "spring")
public interface AuthAssembler {

  default UserDto toDto(User user) {
    return UserDto.builder()
        .userId(user.getId())
        .userName(user.getUserName())
        .fullName(user.getFullName())
        .deptId(user.getOrgId())
        .build();
  }
}
